<!--头部-->
<div class="dev_top" >
     <span class="dev_logo">
         <img src="images/logo.png"  ng-click="vm.back()">
          <span> 版本升级 </span>
     </span>
</div>
<!--设备列表content-->
<div class="dev_list_content">
    <!--店铺名字-->
    <div class="dev_shopname">
        <img src="images/back.png" width="1px">
          <span>汉堡王</span>
    </div>
    <!--选择搜索区域-->
    <div class=" dev_btn_area" >
                <div class="pull-left dev_num">
                   <span>我的设备（{{vm.verList.length}}）</span>
                </div>
                <div class="pull-right dev_btn">
                    <label  ng-show="vm.visiable">
                        <input type="checkbox"ng-model="vm.currentmaster" ng-click="vm.prepare_currentall(vm.currentmaster)" id="cur_chb"  ng-disabled="vm.master==true" >选择当前页
                    </label>
                    <label  ng-show="vm.visiable">
                        <input type="checkbox" ng-model="vm.master" ng-click="vm.prepare_alldata(vm.master)" id="all_chb"  ng-disabled="vm.currentmaster==true" >全选
                    </label>
                    <button type="button"  ng-show="vm.visiable" ng-click="vm.updatas()" ng-disabled="vm.selection_bind.length==0" class="btn dev_Cver">确定升级</button>
                    <button  type="button" ng-click="vm.upBatch()" class="dev_numbtn">批量升级</button>

                </div>

    </div>




    <!--设备列表-->
                <table class="table table-hover dev_table" style="margin-top: 15px;">
                    <thead>
                    <tr class="dev_table_tr">
                        <th></th>
                        <th>序号</th>
                        <th>桌名</th>
                        <th>设备号</th>
                        <th>硬件版本</th>
                        <th>软件版本</th>
                        <th>操作</th>

                    </tr>
                    </thead>
                    <tbody>
                    <tr dir-paginate="ver in vm.verList|filter:vm.search| filter:key | itemsPerPage: vm.pageSize" current-page="vm.currentPage">
                        <td>
                            <input type="checkbox"id="{{ver.devid}}" ng-model="ver.checked" ng-click="vm.prepare_data(ver)" ng-show="vm.visiable" name="chb" class="dev_list_check" >  <!--ng-show="vm.visiable"-->
                        </td>
                        <td>   </td>
                        <td> {{ver.devid}} </td>
                        <td> {{ver.devno}} </td>
                        <td> {{ver.hardver}}</td>
                        <td>{{ver.softver}}</td>
                        <td> <button ng-click="vm.verPop(ver)" class="dev_upbtn">升级设备</button> </td>
                    </tr>
                    </tbody>
                </table>


    <!-- 分页按钮 -->
    <!--on-page-change="myMethod(newPageNumber, oldPageNumber)" 当前页数，之前页数-->
    <div>
        <div class="text-center">
            <dir-pagination-controls boundary-links="true" on-page-change="vm.pageChangeHandler(newPageNumber)"
                                     template-url="tpls/pagination/dirPagination.tpl.html"></dir-pagination-controls>
        </div>
    </div>
    <!--  分页按钮结束 -->

    <!--弹出区域-->
    <!--遮罩层-->
    <div class="bgPop"></div>
    <!--弹出框-->
    <div class="pop">
        <h4 class="text-center"> 将升级该设备到最新版本 </h4>
      <ul ng-repeat="up in vm.upList">
            <li>设备id:{{up.devid}}</li>
            <ul ng-repeat="dev in up.devups">
                <li> 硬件版本：{{dev.hardv}}</li>
                <li> 软件版本：{{dev.softv}}</li>
                <li>
                    升级优化：
                    <span ng-show="{{dev.packageType}}==1">版本</span>
                    <span ng-show="{{dev.packageType}}==2">补丁</span>

                </li>
                <li>版本说明：{{dev.logbook}}</li>
            </ul>
        </ul>

        <input type="button"  class="btn  btn-default cancel"  value="取消"  ng-click="vm.cancel()"/>
        <input type="button"  class="btn  btn-default ok" value="确定" ng-click="vm.upConfirm(vm.upList)"/>
    </div>





</div>
